package com.visionet.school.app.web.repository.member;

import com.visionet.school.app.web.entity.member.MemberExtendInfo;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

/**
 * Created by hxpeng on 2017/3/3.
 */
@Repository
public interface MemberExtendInfoRepository extends PagingAndSortingRepository<MemberExtendInfo,String>,JpaSpecificationExecutor<MemberExtendInfo> {

    /**
     * 获取成员扩展信息
     * @param memberId
     * @return
     */
    @Query("from MemberExtendInfo as m where m.memberId = ?1 and m.isDeleted = 0 ")
    public MemberExtendInfo getMemberExtendInfo(String memberId);

}
